﻿using System;
using System.Data;

/// <summary>
/// Summary description for AddressBO
/// </summary>
public class AddressBO
{
	public AddressBO()
	{
		//
		// TODO: Add constructor logic here
		//
	}
    private long  _pinCode ;
	private long _phoneNumber;
	private string _addressId;
	private string _emailId;
	private string _addressLine1;
	private string _addressLine2;
	private string _aAddressLine3;
	private string _city;
	private DateTime _addCrtdDt;



	public string EmailId
		{
		get { return _emailId; }
		set { _emailId = value; }
		}

    public long PhoneNumber
    {
        get { return _phoneNumber; }
        set { _phoneNumber = value; }
    }

    public long PinCode
    {
        get { return _pinCode; }
        set { _pinCode = value; }
    }

    public string AddressId
    {
        get { return _addressId; }
        set { _addressId = value; }
    }
   

    public string City
    {
        get { return _city; }
        set { _city = value; }
    }

    public string AddressLine3
    {
        get { return _aAddressLine3; }
        set { _aAddressLine3 = value; }
    }

    public string AddressLine2
    {
        get { return _addressLine2; }
        set { _addressLine2 = value; }
    }

    public string AddressLine1
    {
        get { return _addressLine1; }
        set { _addressLine1 = value; }
    }
    

    public DateTime AddCrtdDt
    {
        get { return _addCrtdDt; }
        set { _addCrtdDt = value; }
    }


	AddressDAL _addressDal = new AddressDAL();


	public int InsertAddress()
		{
		try
			{
			return _addressDal.CreateAddress(this);
			}
		catch (Exception ex)
			{
			throw ex;
			}
		

		}

	public int UpdateAddress()
		{
		
		try
			{
			return _addressDal.UpdateAddress(this);
			}

		catch
			{
			throw;
			}

	

		}
	public DataTable AddressDisplay()
		{


		try
			{
			return _addressDal.Load();
			}

		catch
			{
			throw;
			}

		

		}
	public int DeleteAddress()
		{
		try
			{
			return _addressDal.DeleteAddress(this);
			}

		catch
			{
			throw;
			}

		
		}
}